<html>
<head>
<style>
    body,td{font-size:12px;font-family:'Arial Negreta','Arial';}
</style>
<link rel="stylesheet" type="text/css" href="/css/jquery.datetimepicker.css"/>
<script type='text/javascript' src='/js/jquery-1.11.1.min.js'></script>
<script type='text/javascript' src='/js/jquery.form.min.js'></script>
<script type='text/javascript' src='/js/jquery.datetimepicker.js'></script>
<script type='text/javascript' src='/js/layer/layer.min.js'></script>
</head>
<body>
<form name='myForm1' id='myForm1' method='post' action='/schedule/doplan'>
    <div style='margin:10px;'>
        <table>
            <tbody>
            <tr>
                <th>星期</th><th>开始时间</th><th>结束时间</th><th>窗口</th>
            </tr>
            <tr>
                <td>周一：</td>
                <td><input name='start[]' type='text' value='<{if $info[1]}><{$info[1].start_time}><{/if}>' class="Wdate" width="80px"></td>
                <td><input name='end[]' type='text' value='<{if $info[1]}><{$info[1].end_time}><{/if}>'  class="Wdate" width="80px"></td>
                <td><input name="wicket[]" type="text" value="<{if $info[1]}><{$info[1].wicket}><{/if}>" width="50px"</td>
            </tr>
            <tr>
                <td>周二：</td>
                <td><input name='start[]' type='text' value='<{if $info[2]}><{$info[2].start_time}><{/if}>'  class="Wdate" width="80px"></td>
                <td><input name='end[]' type='text' value='<{if $info[2]}><{$info[2].end_time}><{/if}>' class="Wdate" width="80px"></td>
                <td><input name="wicket[]" type="text" value="<{if $info[2]}><{$info[2].wicket}><{/if}>" width="50px"</td>
            </tr>
            <tr>
                <td>周三：</td>
                <td><input name='start[]' type='text' value='<{if $info[3]}><{$info[3].start_time}><{/if}>' class="Wdate" width="80px"></td>
                <td><input name='end[]' type='text' value='<{if $info[3]}><{$info[3].end_time}><{/if}>' class="Wdate"  width="80px"></td>
                <td><input name="wicket[]" type="text" value="<{if $info[3]}><{$info[3].wicket}><{/if}>" width="50px"</td>
            </tr>
            <tr>
                <td>周四：</td>
                <td><input name='start[]' type='text' value='<{if $info[4]}><{$info[4].start_time}><{/if}>' class="Wdate" width="80px"></td>
                <td><input name='end[]' type='text' value='<{if $info[4]}><{$info[4].end_time}><{/if}>' class="Wdate"  width="80px"></td>
                <td><input name="wicket[]" type="text" value="<{if $info[4]}><{$info[4].wicket}><{/if}>" width="50px"</td>
            </tr>
            <tr>
                <td>周五：</td>
                <td><input name='start[]' type='text' value='<{if $info[5]}><{$info[5].start_time}><{/if}>' class="Wdate" width="80px"></td>
                <td><input name='end[]' type='text' value='<{if $info[5]}><{$info[5].end_time}><{/if}>' class="Wdate"  width="80px"></td>
                <td><input name="wicket[]" type="text" value="<{if $info[5]}><{$info[5].wicket}><{/if}>" width="50px"</td>
            </tr>
            <tr>
                <td>周六：</td>
                <td><input name='start[]' type='text' value='<{if $info[6]}><{$info[6].start_time}><{/if}>' class="Wdate" width="80px"></td>
                <td><input name='end[]' type='text' value='<{if $info[6]}><{$info[6].end_time}><{/if}>' class="Wdate"  width="80px"></td>
                <td><input name="wicket[]" type="text" value="<{if $info[6]}><{$info[6].wicket}><{/if}>" width="50px"</td>
            </tr>
            <tr>
                <td>周日：</td>
                <td><input name='start[]' type='text' value='<{if $info[7]}><{$info[7].start_time}><{/if}>' class="Wdate" width="80px"></td>
                <td><input name='end[]' type='text' value='<{if $info[7]}><{$info[7].end_time}><{/if}>' class="Wdate"  width="80px"></td>
                <td><input name="wicket[]" type="text" value="<{if $info[7]}><{$info[7].wicket}><{/if}>" width="50px"</td>
            </tr>
            <tr><td colspan='3'><input type='submit' value='提交'></td></tr>
            </tbody>
        </table>
        <input name='staff_id' type='hidden' value='<{$staff_id}>' />
    </div>
</form>
    <script>
        $(document).ready(function() {     
                var options = {         
                    beforeSubmit:  showRequest,  
                    success:       showResponse,
                    dataType:  'json'
                }
                $('#myForm1').ajaxForm(options);  
                
                
                $('.Wdate').datetimepicker({
                        datepicker:false,
                        format:'H:i',
                        allowTimes:['12:00','13:00','15:00','17:00','18:00','18:30','19:00','20:00']
                });

        });
            function showRequest(formData, jqForm, options) { 
                return true;
            }
            function showResponse(responseText, statusText, xhr, $form)  { 
                if (responseText.status==1) {
                    window.parent.location.reload();return;
                }
                alert(responseText.note);
            }
    </script>
</body>
</html>